home *** CD-ROM | disk | FTP | other *** search
/ QuickTime - The Beta Release / QuickTime - The Beta Release.iso / Programming Stuff / Interfaces / Movies Interfaces / QuickTimeComponents.h < prev    next >
Text File  |  1991-09-06  |  35KB  |  899 lines

  1.  
  2. /************************************************************
  3.  
  4. Created: Saturday, August 17, 1991 at 10:03 AM
  5.  QuickTimeComponents.h
  6.  C Interface to the Macintosh Libraries
  7.  
  8.  
  9.  Copyright Apple Computer, Inc. 1991
  10.  All rights reserved
  11.  
  12. ************************************************************/
  13.  
  14.  
  15. #ifndef __QUICKTIMECOMPONENTS__
  16. #define __QUICKTIMECOMPONENTS__
  17.  
  18. #ifndef __COMPONENTS__
  19. #include <Components.h>
  20. #endif
  21.  
  22. #ifndef __IMAGECOMPRESSION__
  23. #include <ImageCompression.h>
  24. #endif
  25.  
  26. #ifndef __MOVIES__
  27. #include <Movies.h>
  28. #endif
  29.  
  30. #ifndef __QUICKDRAW__
  31. #include <QuickDraw.h>
  32. #endif
  33.  
  34. #ifndef __VIDEO__
  35. #include <Video.h>
  36. #endif
  37.  
  38.  
  39. enum {
  40.  
  41.  
  42. /*****
  43.  
  44.  Clock Component
  45.  
  46. *****/
  47.  
  48. #define clockComponentType 'clok'
  49. #define systemTickClock 'tick'            /* subtype: 60ths since boot */
  50. #define systemSecondClock 'seco'        /* subtype: seconds since 1904 */
  51. #define systemMillisecondClock 'mill'    /* subtype: 1000ths since boot */
  52. #define systemMicrosecondClock 'micr'    /* subtype: 1000000ths since boot */
  53.  
  54.  
  55.  kClockRateIsLinear = 1,
  56.  kClockImplementsCallBacks = 2
  57.  
  58. };
  59.  
  60. enum {kClockGetClockTimeSelect = 1,kClockSetClockTimeSelect = 2,kClockNewCallBackSelect,
  61.  kClockDisposeCallBackSelect,kClockCallMeWhenSelect,kClockCancelCallBackSelect,
  62.  kClockRateChangedSelect,kClockTimeChangedSelect,kClockSetTimeBaseSelect};
  63. typedef unsigned  ClockComponentSelectors;
  64.  
  65.  
  66. #ifdef __cplusplus
  67. extern "C" {
  68. #endif
  69. pascal ComponentResult GetClockTime(ComponentInstance aClock,TimeRecord *out)
  70.  = {0x2F3C,0x4,0x1,0x7000,0xA82A}; 
  71. pascal QTCallBack ClockNewCallBack(ComponentInstance aClock,TimeBase tb,
  72.  short callBackType)
  73.  = {0x2F3C,0x6,0x1,0x7000,0xA82A}; 
  74. pascal ComponentResult ClockDisposeCallBack(ComponentInstance aClock,QTCallBack cb)
  75.  = {0x2F3C,0x4,0x1,0x7000,0xA82A}; 
  76. pascal ComponentResult ClockCallMeWhen(ComponentInstance clock,QTCallBack cb,
  77.  long param1,long param2,long param3)
  78.  = {0x2F3C,0x10,0x1,0x7000,0xA82A}; 
  79. pascal ComponentResult ClockCancelCallBack(ComponentInstance clock,QTCallBack cb)
  80.  = {0x2F3C,0x4,0x1,0x7000,0xA82A}; 
  81. pascal ComponentResult ClockRateChanged(ComponentInstance clock,QTCallBack cb)
  82.  = {0x2F3C,0x4,0x1,0x7000,0xA82A}; 
  83. pascal ComponentResult ClockTimeChanged(ComponentInstance clock,QTCallBack cb)
  84.  = {0x2F3C,0x4,0x1,0x7000,0xA82A}; 
  85. pascal ComponentResult ClockSetTimeBase(ComponentInstance clock,TimeBase tb)
  86.  = {0x2F3C,0x4,0x1,0x7000,0xA82A}; 
  87.  
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91. enum {
  92.  
  93.  
  94. /*
  95.  Video Digitizer Component
  96.  
  97.  
  98.   Standard type for video digitizers */
  99.  
  100. #define videoDigitizerComponentType 'vdig'
  101. #define vdigInterfaceRev 2L
  102.  
  103.  
  104. /* Input Format Standards */
  105.  
  106.  ntscIn = 0,                            /* ntsc input format */
  107.  palIn = 1,                                /* pal input format */
  108.  secamIn = 2,                            /* secam input format */
  109.  autoDetectIn = 3,                        /* auto detect */
  110.  
  111.  
  112. /* Input Formats */
  113.  compositeIn = 0,                        /* input is composite format */
  114.  sVideoIn = 1,                            /* input is sVideo format */
  115.  rgbComponentIn = 2,                    /* input is rgb component format */
  116.  
  117.  
  118. /* Video Digitizer PlayThru States */
  119.  vdPlayThruOff = 0,
  120.  vdPlayThruOn = 1,
  121.  
  122.  
  123. /* Input Color Space Modes */
  124.  vdDigitizerBW = 0,                        /* black and white */
  125.  vdDigitizerRGB = 1,                    /* rgb color */
  126.  
  127.  
  128. /* Phase Lock Loop Modes */
  129.  vdBroadcastMode = 0,                    /* Broadcast / Laser Disk video mode */
  130.  vdVTRMode = 1,                            /* VCR / Magnetic media mode */
  131.  
  132.  
  133. /* vdig types */
  134.  vdTypeBasic = 0,                        /* basic, no clipping */
  135.  vdTypeAlpha = 1,                        /* supports clipping with alpha channel */
  136.  vdTypeMask = 2,                        /* supports clipping with mask plane */
  137.  vdTypeKey = 3                            /* supports clipping with key color(s) */
  138.  
  139.  
  140. /* Digitizer Error Codes */
  141.  
  142. #define digiUnimpErr -2201                /* feature unimplemented */
  143. #define qtParamErr -2202                /* bad input parameter ( out of range, etc ) */
  144. #define matrixErr -2203                    /* bad matrix, digitizer did nothing */
  145. #define notExactMatrix -2204            /* warning of bad matrix, digitizer did its best */
  146. #define noMoreKeyColors -2205            /* all key indexes in use */
  147. #define notExactSize -2206                /* Can’t do exact size requested */
  148. #define badDepth -2207                    /* Can’t digitize into this depth */
  149. #define noDMA -2208                        /* Can’t do DMA digitizing ( i.e. can't go to requested dest */
  150.  
  151.  
  152. /* Digitizer Input Capability/Current Flags */
  153. #define digiInDoesNTSC (1L<<0)            /* digitizer supports NTSC input format */
  154. #define digiInDoesPAL (1L<<1)            /* digitizer supports PAL input format */
  155. #define digiInDoesSECAM (1L<<2)            /* digitizer supports SECAM input format */
  156. #define digiInDoesGenLock (1L<<7)        /* digitizer does genlock */
  157.  
  158. #define digiInDoesComposite (1L<<8)        /* digitizer supports composite input type */
  159. #define digiInDoesSVideo (1L<<9)        /* digitizer supports S-Video input type */
  160. #define digiInDoesComponent (1L<<10)    /* digitizer supports component (rgb) input type */
  161. #define digiInVTR_Broadcast (1L<<11)    /* digitizer can differentiate between the two */
  162.  
  163. #define digiInDoesColor (1L<<12)        /* digitizer supports color */
  164. #define digiInDoesBW (1L<<13)            /* digitizer supports black & white */
  165.  
  166.  
  167. /* Digitizer Input Current Flags (these are valid only during active operating conditions) */
  168. #define digiInGenLocked (1L<<30)        /* digitizer signal is in genlock mode */
  169. #define digiInSignalLock (1L<<31)        /* digitizer detects input signal is locked - this bit = horiz lock || vertical lock */
  170.  
  171.  
  172. /* Digitizer Output Capability/Current Flags */
  173. #define digiOutDoes1 (1L<<0)            /* digitizer supports 1 bit pixels */
  174. #define digiOutDoes2 (1L<<1)            /* digitizer supports 2 bit pixels */
  175. #define digiOutDoes4 (1L<<2)            /* digitizer supports 4 bit pixels */
  176. #define digiOutDoes8 (1L<<3)            /* digitizer supports 8 bit pixels */
  177. #define digiOutDoes16 (1L<<4)            /* digitizer supports 16 bit pixels */
  178. #define digiOutDoes32 (1L<<5)            /* digitizer supports 32 bit pixels */
  179. #define digiOutDoesDither (1L<<6)        /* digitizer dithers in indexed modes */
  180. #define digiOutDoesStretch (1L<<7)        /* digitizer can arbitrarily stretch */
  181. #define digiOutDoesShrink (1L<<8)        /* digitizer can arbitrarily shrink */
  182. #define digiOutDoesMask (1L<<9)            /* digitizer can mask to clipping regions */
  183.  
  184. #define digiOutDoesDouble (1L<<11)        /* digitizer can stretch to exactly double size */
  185. #define digiOutDoesQuad (1L<<12)        /* digitizer can stretch exactly quadruple size */
  186. #define digiOutDoesQuarter (1L<<13)        /* digitizer can shrink to exactly quarter size */
  187. #define digiOutDoesSixteenth (1L<<14)    /* digitizer can shrink to exactly sixteenth size */
  188.  
  189. #define digiOutDoesRotate (1L<<15)        /* digitizer supports rotate transformations */
  190. #define digiOutDoesHorizFlip (1L<<16)    /* digitizer supports horizontal flips Sx < 0 */
  191. #define digiOutDoesVertFlip (1L<<17)    /* digitizer supports vertical flips Sy < 0 */
  192. #define digiOutDoesSkew (1L<<18)        /* digitizer supports skew (shear, twist) */
  193. #define digiOutDoesBlend (1L<<19)
  194. #define digiOutDoesWarp (1L<<20)
  195.  
  196. #define digiOutDoesHW_DMA (1L<<21)        /* digitizer not constrained to local device */
  197. #define digiOutDoesHWPlayThru (1L<<22)    /* digitizer doesn't need time to play thru */
  198. #define digiOutDoesILUT (1L<<23)        /* digitizer does inverse LUT for index modes */
  199. #define digiOutDoesKeyColor (1L<<24)    /* digitizer does key color functions too */
  200. #define digiOutDoesAsyncGrabs (1L<<25)    /* digitizer supports async grabs */
  201. };
  202.  
  203. typedef ComponentInstance VideoDigitizerThing;
  204. typedef ComponentResult VideoDigitizerError;
  205.  
  206. /* Types */
  207. struct DigitizerInfo {
  208.  short vdigType;
  209.  long inputCapabilityFlags;
  210.  long outputCapabilityFlags;
  211.  long inputCurrentFlags;
  212.  long outputCurrentFlags;
  213.  short slot;                            /* temporary for connection purposes */
  214.  GDHandle gdh;                            /* temporary for digitizers that have preferred screen */
  215.  GDHandle maskgdh;                        /* temporary for digitizers that have mask planes */
  216.  short minDestHeight;                    /* Smallest resizable height */
  217.  short minDestWidth;                    /* Smallest resizable width */
  218.  short maxDestHeight;                    /* Largest resizable height */
  219.  short maxDestWidth;                    /* Largest resizable height */
  220.  short blendLevels;                        /* Number of blend levels supported (2 if 1 bit mask) */
  221.  long Private;                            /* reserved */
  222. };
  223.  
  224. typedef struct DigitizerInfo DigitizerInfo;
  225.  
  226. struct VdigType {
  227.  long digType;
  228.  long Private;
  229. };
  230.  
  231. typedef struct VdigType VdigType;
  232.  
  233. struct VdigTypeList {
  234.  short count;
  235.  VdigType list[1];
  236. };
  237.  
  238. typedef struct VdigTypeList VdigTypeList;
  239. typedef VdigTypeList *VdigTypeListPtr, **VdigTypeListHandle;
  240.  
  241. typedef struct {
  242.     PixMapHandle    dest;
  243.     Point            location;
  244.     long            reserved;
  245. } VdigBufferRec;
  246.  
  247. struct VdigBufferRecList {
  248.     short            count;
  249.     MatrixRecordPtr    matrix;
  250.     RgnHandle        mask;
  251.     VdigBufferRec    list[1];
  252. };
  253.  
  254. typedef struct VdigBufferRecList VdigBufferRecList;
  255. typedef VdigBufferRecList *VdigBufferRecListPtr, **VdigBufferRecListHandle;
  256.  
  257. enum {
  258.  
  259.  
  260. /* Video Digitizer Interface */
  261.  kSelectVDGetMaxSrcRect = 1,
  262.  kSelectVDGetActiveSrcRect = 2,
  263.  kSelectVDSetDigitizerRect = 3,
  264.  kSelectVDGetDigitizerRect = 4,
  265.  kSelectVDGetVBlankRect = 5,
  266.  kSelectVDGetMaskPixMap = 6,
  267.  kSelectVDDone = 7,
  268.  kSelectVDGetPlayThruDestination = 8,
  269.  kSelectVDUseThisCLUT = 9,
  270.  kSelectVDSetInputGammaValue = 10,
  271.  kSelectVDGetInputGammaValue = 11,
  272.  kSelectVDSetBrightness = 12,
  273.  kSelectVDGetBrightness = 13,
  274.  kSelectVDSetContrast = 14,
  275.  kSelectVDSetHue = 15,
  276.  kSelectVDSetSharpness = 16,
  277.  kSelectVDSetSaturation = 17,
  278.  kSelectVDGetContrast = 18,
  279.  kSelectVDGetHue = 19,
  280.  kSelectVDGetSharpness = 20
  281. };
  282. enum {
  283.  kSelectVDGetSaturation = 21,
  284.  kSelectVDGrabOneFrame = 22,
  285.  kSelectVDGetMaxAuxBuffer = 23,
  286.  kSelectVDGrabOneFrameAsync = 24,
  287.  kSelectVDGetDigitizerInfo = 25,
  288.  kSelectVDGetCurrentFlags = 26,
  289.  kSelectVDSetKeyColor = 27,
  290.  kSelectVDGetKeyColor = 28,
  291.  kSelectVDAddKeyColor = 29,
  292.  kSelectVDGetNextKeyColor = 30,
  293.  kSelectVDSetKeyColorRange = 31,
  294.  kSelectVDGetKeyColorRange = 32,
  295.  kSelectVDSetDigitizerUserInterrupt = 33,
  296.  kSelectVDSetInputColorSpaceMode = 34,
  297.  kSelectVDGetInputColorSpaceMode = 35,
  298.  kSelectVDSetClipState = 36,
  299.  kSelectVDGetClipState = 37,
  300.  kSelectVDSetClipRgn = 38,
  301.  kSelectVDClearClipRgn = 39,
  302.  kSelectVDGetCLUTInUse = 40
  303. };
  304. enum {
  305.  kSelectVDSetPLLFilterType = 41,
  306.  kSelectVDGetPLLFilterType = 42,
  307.  kSelectVDGetMaskandValue = 43,
  308.  kSelectVDSetMasterBlendLevel = 44,
  309.  kSelectVDSetPlayThruDestination = 45,
  310.  kSelectVDSetPlayThruOnOff = 46,
  311.  kSelectVDGetAltDataTypes = 47,
  312.  kSelectVDSetAltDataDestination = 48,
  313.  kSelectVDSetAltDataOnOff = 49,
  314.  kSelectVDPreflightDestination = 50,
  315.  kSelectVDPreflightGlobalRect = 51,
  316.  kSelectVDSetPlayThruGlobalRect = 52,
  317.  kSelectVDSetInputGammaRecord = 53,
  318.  kSelectVDGetInputGammaRecord = 54,
  319.  kSelectVDSetBlackLevelValue = 55,
  320.  kSelectVDGetBlackLevelValue = 56,
  321.  kSelectVDSetWhiteLevelValue = 57,
  322.  kSelectVDGetWhiteLevelValue = 58,
  323.  kSelectVDGetVideoDefaults = 59,
  324.  kSelectVDGetNumberOfInputs = 60
  325. };
  326. enum {
  327.  kSelectVDGetInputFormat = 61,
  328.  kSelectVDSetInput = 62,
  329.  kSelectVDGetInput = 63,
  330.  kSelectVDSetInputStandard = 64,
  331.  kSelectVDSetupBuffers = 65,
  332.  kSelectVDGrabOneFrameAsync2 = 66,
  333.  kSelectVDDone2 = 67,
  334.  
  335.  kvdigSelectors = 67
  336. };
  337.  
  338. #ifdef __cplusplus
  339. extern "C" {
  340. #endif
  341. pascal VideoDigitizerError VDGetMaxSrcRect(VideoDigitizerThing ti,short inputStd,
  342.  Rect *maxSrcRect)
  343.  = {0x2F3C,0x6,0x1,0x7000,0xA82A}; 
  344. pascal VideoDigitizerError VDGetActiveSrcRect(VideoDigitizerThing ti,short inputStd,
  345.  Rect *activeSrcRect)
  346.  = {0x2F3C,0x6,0x2,0x7000,0xA82A}; 
  347. pascal VideoDigitizerError VDSetDigitizerRect(VideoDigitizerThing ti,Rect *digitizerRect)
  348.  = {0x2F3C,0x4,0x3,0x7000,0xA82A}; 
  349. pascal VideoDigitizerError VDGetDigitizerRect(VideoDigitizerThing ti,Rect *digitizerRect)
  350.  = {0x2F3C,0x4,0x4,0x7000,0xA82A}; 
  351. pascal VideoDigitizerError VDGetVBlankRect(VideoDigitizerThing ti,short inputStd,
  352.  Rect *vBlankRect)
  353.  = {0x2F3C,0x6,0x5,0x7000,0xA82A}; 
  354. pascal VideoDigitizerError VDGetMaskPixMap(VideoDigitizerThing ti,PixMapHandle maskPixMap)
  355.  = {0x2F3C,0x4,0x6,0x7000,0xA82A}; 
  356. pascal VideoDigitizerError VDGetPlayThruDestination(VideoDigitizerThing ti,
  357.  PixMapHandle *dest,Rect *destRect,MatrixRecord *m,RgnHandle *mask)
  358.  = {0x2F3C,0x10,0x8,0x7000,0xA82A}; 
  359. pascal VideoDigitizerError VDUseThisCLUT(VideoDigitizerThing ti,CTabHandle colorTableHandle)
  360.  = {0x2F3C,0x4,0x9,0x7000,0xA82A}; 
  361. pascal VideoDigitizerError VDSetInputGammaValue(VideoDigitizerThing ti,
  362.  Fixed channel1,Fixed channel2,Fixed channel3)
  363.  = {0x2F3C,0xC,0xA,0x7000,0xA82A}; 
  364. pascal VideoDigitizerError VDGetInputGammaValue(VideoDigitizerThing ti,
  365.  Fixed *channel1,Fixed *channel2,Fixed *channel3)
  366.  = {0x2F3C,0xC,0xB,0x7000,0xA82A}; 
  367. pascal VideoDigitizerError VDSetBrightness(VideoDigitizerThing ti,unsigned short *brightness)
  368.  = {0x2F3C,0x4,0xC,0x7000,0xA82A}; 
  369. pascal VideoDigitizerError VDGetBrightness(VideoDigitizerThing ti,unsigned short *brightness)
  370.  = {0x2F3C,0x4,0xD,0x7000,0xA82A}; 
  371. pascal VideoDigitizerError VDSetContrast(VideoDigitizerThing ti,unsigned short *contrast)
  372.  = {0x2F3C,0x4,0xE,0x7000,0xA82A}; 
  373. pascal VideoDigitizerError VDSetHue(VideoDigitizerThing ti,unsigned short *hue)
  374.  = {0x2F3C,0x4,0xF,0x7000,0xA82A}; 
  375. pascal VideoDigitizerError VDSetSharpness(VideoDigitizerThing ti,unsigned short *sharpness)
  376.  = {0x2F3C,0x4,0x10,0x7000,0xA82A}; 
  377. pascal VideoDigitizerError VDSetSaturation(VideoDigitizerThing ti,unsigned short *saturation)
  378.  = {0x2F3C,0x4,0x11,0x7000,0xA82A}; 
  379. pascal VideoDigitizerError VDGetContrast(VideoDigitizerThing ti,unsigned short *contrast)
  380.  = {0x2F3C,0x4,0x12,0x7000,0xA82A}; 
  381. pascal VideoDigitizerError VDGetHue(VideoDigitizerThing ti,unsigned short *hue)
  382.  = {0x2F3C,0x4,0x13,0x7000,0xA82A}; 
  383. pascal VideoDigitizerError VDGetSharpness(VideoDigitizerThing ti,unsigned short *sharpness)
  384.  = {0x2F3C,0x4,0x14,0x7000,0xA82A}; 
  385. pascal VideoDigitizerError VDGetSaturation(VideoDigitizerThing ti,unsigned short *saturation)
  386.  = {0x2F3C,0x4,0x15,0x7000,0xA82A}; 
  387. pascal VideoDigitizerError VDGrabOneFrame(VideoDigitizerThing ti)
  388.  = {0x2F3C,0x0,0x16,0x7000,0xA82A}; 
  389. pascal VideoDigitizerError VDGetMaxAuxBuffer(VideoDigitizerThing ti,PixMapHandle *pm,
  390.  Rect *r)
  391.  = {0x2F3C,0x8,0x17,0x7000,0xA82A}; 
  392. pascal VideoDigitizerError VDGetDigitizerInfo(VideoDigitizerThing ti,DigitizerInfo *info)
  393.  = {0x2F3C,0x4,0x19,0x7000,0xA82A}; 
  394. pascal VideoDigitizerError VDGetCurrentFlags(VideoDigitizerThing ti,long *inputCurrentFlag,
  395.  long *outputCurrentFlag)
  396.  = {0x2F3C,0x8,0x1A,0x7000,0xA82A}; 
  397. pascal VideoDigitizerError VDSetKeyColor(VideoDigitizerThing ti,long index)
  398.  = {0x2F3C,0x4,0x1B,0x7000,0xA82A}; 
  399. pascal VideoDigitizerError VDGetKeyColor(VideoDigitizerThing ti,long *index)
  400.  = {0x2F3C,0x4,0x1C,0x7000,0xA82A}; 
  401. pascal VideoDigitizerError VDAddKeyColor(VideoDigitizerThing ti,long *index)
  402.  = {0x2F3C,0x4,0x1D,0x7000,0xA82A}; 
  403. pascal VideoDigitizerError VDGetNextKeyColor(VideoDigitizerThing ti,long index)
  404.  = {0x2F3C,0x4,0x1E,0x7000,0xA82A}; 
  405. pascal VideoDigitizerError VDSetKeyColorRange(VideoDigitizerThing ti,RGBColor *minRGB,
  406.  RGBColor *maxRGB)
  407.  = {0x2F3C,0x8,0x1F,0x7000,0xA82A}; 
  408. pascal VideoDigitizerError VDGetKeyColorRange(VideoDigitizerThing ti,RGBColor *minRGB,
  409.  RGBColor *maxRGB)
  410.  = {0x2F3C,0x8,0x20,0x7000,0xA82A}; 
  411. pascal VideoDigitizerError VDSetDigitizerUserInterrupt(VideoDigitizerThing ti,
  412.  short whichOne,ProcPtr userInterruptProc,Ptr params)
  413.  = {0x2F3C,0xA,0x21,0x7000,0xA82A}; 
  414. pascal VideoDigitizerError VDSetInputColorSpaceMode(VideoDigitizerThing ti,
  415.  short colorSpaceMode)
  416.  = {0x2F3C,0x2,0x22,0x7000,0xA82A}; 
  417. pascal VideoDigitizerError VDGetInputColorSpaceMode(VideoDigitizerThing ti,
  418.  short *colorSpaceMode)
  419.  = {0x2F3C,0x4,0x23,0x7000,0xA82A}; 
  420. pascal VideoDigitizerError VDSetClipState(VideoDigitizerThing ti,short clipEnable)
  421.  = {0x2F3C,0x2,0x24,0x7000,0xA82A}; 
  422. pascal VideoDigitizerError VDGetClipState(VideoDigitizerThing ti,short *clipEnable)
  423.  = {0x2F3C,0x4,0x25,0x7000,0xA82A}; 
  424. pascal VideoDigitizerError VDSetClipRgn(VideoDigitizerThing ti,RgnHandle clipRegion)
  425.  = {0x2F3C,0x4,0x26,0x7000,0xA82A}; 
  426. pascal VideoDigitizerError VDClearClipRgn(VideoDigitizerThing ti,RgnHandle clipRegion)
  427.  = {0x2F3C,0x4,0x27,0x7000,0xA82A}; 
  428. pascal VideoDigitizerError VDGetCLUTInUse(VideoDigitizerThing ti,CTabHandle *colorTableHandle)
  429.  = {0x2F3C,0x4,0x28,0x7000,0xA82A}; 
  430. pascal VideoDigitizerError VDSetPLLFilterType(VideoDigitizerThing ti,short pllType)
  431.  = {0x2F3C,0x2,0x29,0x7000,0xA82A}; 
  432. pascal VideoDigitizerError VDGetPLLFilterType(VideoDigitizerThing ti,short *pllType)
  433.  = {0x2F3C,0x4,0x2A,0x7000,0xA82A}; 
  434. pascal VideoDigitizerError VDGetMaskandValue(VideoDigitizerThing ti,short blendLevel,
  435.  long *mask,long *value)
  436.  = {0x2F3C,0xA,0x2B,0x7000,0xA82A}; 
  437. pascal VideoDigitizerError VDSetMasterBlendLevel(VideoDigitizerThing ti,
  438.  short *blendLevel)
  439.  = {0x2F3C,0x4,0x2C,0x7000,0xA82A}; 
  440. pascal VideoDigitizerError VDSetPlayThruDestination(VideoDigitizerThing ti,
  441.  PixMapHandle dest,Rect *destRect,MatrixRecord *m,RgnHandle mask)
  442.  = {0x2F3C,0x10,0x2D,0x7000,0xA82A}; 
  443. pascal VideoDigitizerError VDSetPlayThruOnOff(VideoDigitizerThing ti,short state)
  444.  = {0x2F3C,0x2,0x2E,0x7000,0xA82A}; 
  445. pascal VideoDigitizerError VDGetAltDataTypes(VideoDigitizerThing ti,VdigTypeListHandle list)
  446.  = {0x2F3C,0x4,0x2F,0x7000,0xA82A}; 
  447. pascal VideoDigitizerError VDSetAltDataDestination(VideoDigitizerThing ti,
  448.  long dstType,Ptr startAddr,short rowBytes,short PixelSize,long bufferSize,
  449.  Rect *destRect,MatrixRecord *m,ProcPtr frameDonePtr)
  450.  = {0x2F3C,0x1C,0x30,0x7000,0xA82A}; 
  451. pascal VideoDigitizerError VDSetAltDataOnOff(VideoDigitizerThing ti,short state)
  452.  = {0x2F3C,0x2,0x31,0x7000,0xA82A}; 
  453. pascal VideoDigitizerError VDPreflightDestination(VideoDigitizerThing ti,
  454.  Rect *digitizerRect,PixMapHandle dest,Rect *destRect,MatrixRecord *m)
  455.  = {0x2F3C,0x10,0x32,0x7000,0xA82A}; 
  456. pascal VideoDigitizerError VDPreflightGlobalRect(VideoDigitizerThing ti,
  457.  GrafPtr theWindow,Rect *globalRect)
  458.  = {0x2F3C,0x8,0x33,0x7000,0xA82A}; 
  459. pascal VideoDigitizerError VDSetPlayThruGlobalRect(VideoDigitizerThing ti,
  460.  GrafPtr theWindow,Rect *globalRect)
  461.  = {0x2F3C,0x8,0x34,0x7000,0xA82A}; 
  462. pascal VideoDigitizerError VDSetInputGammaRecord(VideoDigitizerThing ti,
  463.  VDGamRecPtr inputGammaPtr)
  464.  = {0x2F3C,0x4,0x35,0x7000,0xA82A}; 
  465. pascal VideoDigitizerError VDGetInputGammaRecord(VideoDigitizerThing ti,
  466.  VDGamRecPtr *inputGammaPtr)
  467.  = {0x2F3C,0x4,0x36,0x7000,0xA82A}; 
  468. pascal VideoDigitizerError VDSetBlackLevelValue(VideoDigitizerThing ti,
  469.  unsigned short *blackLevel)
  470.  = {0x2F3C,0x4,0x37,0x7000,0xA82A}; 
  471. pascal VideoDigitizerError VDGetBlackLevelValue(VideoDigitizerThing ti,
  472.  unsigned short *blackLevel)
  473.  = {0x2F3C,0x4,0x38,0x7000,0xA82A}; 
  474. pascal VideoDigitizerError VDSetWhiteLevelValue(VideoDigitizerThing ti,
  475.  unsigned short *whiteLevel)
  476.  = {0x2F3C,0x4,0x39,0x7000,0xA82A}; 
  477. pascal VideoDigitizerError VDGetWhiteLevelValue(VideoDigitizerThing ti,
  478.  unsigned short *whiteLevel)
  479.  = {0x2F3C,0x4,0x3A,0x7000,0xA82A}; 
  480. pascal VideoDigitizerError VDGetVideoDefaults(VideoDigitizerThing ti,unsigned short *blackLevel,
  481.  unsigned short *whiteLevel,unsigned short *brightness,unsigned short *hue,
  482.  unsigned short *saturation,unsigned short *contrast,unsigned short *sharpness)
  483.  = {0x2F3C,0x1C,0x3B,0x7000,0xA82A}; 
  484. pascal VideoDigitizerError VDGrabOneFrameAsync(VideoDigitizerThing ti,Boolean bufferingOn,
  485.  PixMapHandle nextDest,Point nextPt)
  486.  = {0x2F3C,0xA,0x18,0x7000,0xA82A}; 
  487. pascal long VDDone(VideoDigitizerThing ti)
  488.  = {0x2F3C,0x0,0x7,0x7000,0xA82A}; 
  489. pascal VideoDigitizerError VDGetNumberOfInputs(VideoDigitizerThing ti,short *inputs)
  490.  = {0x2F3C,0x4,0x3C,0x7000,0xA82A}; 
  491. pascal VideoDigitizerError VDGetInputFormat(VideoDigitizerThing ti,short input,
  492.  short *format)
  493.  = {0x2F3C,0x6,0x3D,0x7000,0xA82A}; 
  494. pascal VideoDigitizerError VDSetInput(VideoDigitizerThing ti,short input)
  495.  = {0x2F3C,0x2,0x3E,0x7000,0xA82A}; 
  496. pascal VideoDigitizerError VDGetInput(VideoDigitizerThing ti,short *input)
  497.  = {0x2F3C,0x4,0x3F,0x7000,0xA82A}; 
  498. pascal VideoDigitizerError VDSetInputStandard(VideoDigitizerThing ti,short inputStandard)
  499.  = {0x2F3C,0x2,0x40,0x7000,0xA82A}; 
  500. pascal VideoDigitizerError    VDSetupBuffers(VideoDigitizerThing ti, VdigBufferRecListHandle bufferList)
  501.  = {0x2F3C,0x4,0x41,0x7000,0xA82A}; 
  502. pascal VideoDigitizerError    VDGrabOneFrameAsync2(VideoDigitizerThing ti, short buffer)
  503.  = {0x2F3C,0x2,0x42,0x7000,0xA82A}; 
  504. pascal long    VDDone2(VideoDigitizerThing ti, short buffer)
  505.  = {0x2F3C,0x2,0x43,0x7000,0xA82A}; 
  506. #ifdef __cplusplus
  507. }
  508. #endif
  509. /* Sequence Grab Component */
  510. typedef ComponentInstance SeqGrabComponent;
  511. typedef ComponentInstance SGChannel;
  512.  
  513.  
  514.  
  515.  
  516. #define SeqGrabComponentType 'barg'
  517. #define SeqGrabChannelType 'sgch'
  518.  
  519. #define grabPictOffScreen (1)
  520. #define sgFlagControlledGrab (1)
  521.  
  522. #define channelPlayNormal 0
  523. #define channelPlayFast 1
  524. #define channelPlayHighQuality 2
  525. #define channelPlayAllData 4
  526.  
  527. enum {seqGrabToDisk = 1,seqGrabToMemory = 2,seqGrabDontUseTempMemory = 4,
  528.  seqGrabAppendToFile = 8,seqGrabDontAddMovieResource = 16};
  529. typedef unsigned char SeqGrabDataOutputEnum;
  530.  
  531. enum {seqGrabRecord = 1,seqGrabPreview = 2,seqGrabPlayDuringRecord = 4};
  532. typedef unsigned char SeqGrabUsageEnum;
  533.  
  534. enum {seqGrabHasBounds = 1,seqGrabHasVolume = 2, seqGrabHasDiscreteSamples = 4};
  535. typedef unsigned char SeqGrabChannelInfoEnum;
  536.  
  537.  
  538. struct SeqGrabFrameInfo {
  539.  long frameOffset;
  540.  long frameTime;
  541.  long frameSize;
  542.  SGChannel frameChannel;
  543.  long frameRefCon;
  544. };
  545.  
  546. enum {
  547.  noDeviceForChannel = -9400,
  548.  grabTimeComplete = -9401,
  549.  cantDoThatInCurrentMode = -9402,
  550.  notEnoughMemoryToGrab = -9403,
  551.  notEnoughDiskSpaceToGrab = -9404,
  552.  couldntGetRequiredComponent = -9405,
  553.  badSGChannel = -9406,
  554.  seqGrabInfoNotAvailable = -9407,
  555.  deviceCantMeetRequest = -9408
  556. };
  557.  
  558. typedef struct SeqGrabFrameInfo SeqGrabFrameInfo;
  559.  
  560.  
  561. #ifdef __cplusplus
  562. extern "C" {
  563. #endif
  564. pascal ComponentResult SGInitialize(SeqGrabComponent s)
  565.  = {0x2F3C,0x0,0x1,0x7000,0xA82A}; 
  566.  
  567. pascal ComponentResult SGSetDataOutput(SeqGrabComponent s,FSSpec *movieFile,
  568.  long whereFlags)
  569.  = {0x2F3C,0x8,0x2,0x7000,0xA82A}; 
  570. pascal ComponentResult SGGetDataOutput(SeqGrabComponent s,FSSpec *movieFile,
  571.  long *whereFlags)
  572.  = {0x2F3C,0x8,0x3,0x7000,0xA82A}; 
  573.  
  574. pascal ComponentResult SGSetGWorld(SeqGrabComponent s,CGrafPtr gp,GDHandle gd)
  575.  = {0x2F3C,0x8,0x4,0x7000,0xA82A}; 
  576. pascal ComponentResult SGGetGWorld(SeqGrabComponent s,CGrafPtr *gp,GDHandle *gd)
  577.  = {0x2F3C,0x8,0x5,0x7000,0xA82A}; 
  578.  
  579. pascal ComponentResult SGNewChannel(SeqGrabComponent s,OSType channelType,
  580.  SGChannel *ref)
  581.  = {0x2F3C,0x8,0x6,0x7000,0xA82A}; 
  582. pascal ComponentResult SGDisposeChannel(SeqGrabComponent s,SGChannel c)
  583.  = {0x2F3C,0x4,0x7,0x7000,0xA82A}; 
  584.  
  585. pascal ComponentResult SGStartPreview(SeqGrabComponent s)
  586.  = {0x2F3C,0x0,0x10,0x7000,0xA82A}; 
  587. pascal ComponentResult SGStartRecord(SeqGrabComponent s)
  588.  = {0x2F3C,0x0,0x11,0x7000,0xA82A}; 
  589. pascal ComponentResult SGIdle(SeqGrabComponent s)
  590.  = {0x2F3C,0x0,0x12,0x7000,0xA82A}; 
  591. pascal ComponentResult SGStop(SeqGrabComponent s)
  592.  = {0x2F3C,0x0,0x13,0x7000,0xA82A}; 
  593.  
  594. pascal ComponentResult SGPause(SeqGrabComponent s,Boolean pause)
  595.  = {0x2F3C,0x2,0x14,0x7000,0xA82A}; 
  596.  
  597. pascal ComponentResult SGPrepare(SeqGrabComponent s,Boolean prepareForPreview,
  598.  Boolean prepareForRecord)
  599.  = {0x2F3C,0x4,0x15,0x7000,0xA82A}; 
  600. pascal ComponentResult SGRelease(SeqGrabComponent s)
  601.  = {0x2F3C,0x0,0x16,0x7000,0xA82A}; 
  602.  
  603. pascal Movie SGGetMovie(SeqGrabComponent s)
  604.  = {0x2F3C,0x0,0x17,0x7000,0xA82A}; 
  605.  
  606. pascal ComponentResult SGSetMaximumRecordTime(SeqGrabComponent s,unsigned long ticks)
  607.  = {0x2F3C,0x4,0x18,0x7000,0xA82A}; 
  608. pascal ComponentResult SGGetMaximumRecordTime(SeqGrabComponent s,unsigned long *ticks)
  609.  = {0x2F3C,0x4,0x19,0x7000,0xA82A}; 
  610.  
  611. pascal ComponentResult SGGetStorageSpaceRemaining(SeqGrabComponent s,unsigned long *bytes)
  612.  = {0x2F3C,0x4,0x1A,0x7000,0xA82A}; 
  613. pascal ComponentResult SGGetTimeRemaining(SeqGrabComponent s,long *ticksLeft)
  614.  = {0x2F3C,0x4,0x1B,0x7000,0xA82A}; 
  615. pascal ComponentResult SGGrabPict(SeqGrabComponent s, PicHandle *p, const Rect *bounds,
  616.  short offscreenDepth, long grabPictFlags) =
  617.  {0x2F3C,0xe,0x1C,0x7000,0xA82A};
  618.  
  619. pascal ComponentResult SGGetLastMovieResID(SeqGrabComponent s, short *resID) =
  620.  {0x2F3C,0x4,0x1D,0x7000,0xA82A};
  621.  
  622. pascal ComponentResult SGSetFlags(SeqGrabComponent s, long sgFlags) =
  623.  {0x2F3C,0x4,0x1E,0x7000,0xA82A};
  624.  
  625. pascal ComponentResult SGGetFlags(SeqGrabComponent s, long *sgFlags) =
  626.  {0x2F3C,0x4,0x1F,0x7000,0xA82A};
  627.  
  628.  
  629. /*   General Channel Routines   */
  630. pascal ComponentResult SGSetChannelUsage(SGChannel c,long usage)
  631.  = {0x2F3C,0x4,0x80,0x7000,0xA82A}; 
  632. pascal ComponentResult SGGetChannelUsage(SGChannel c,long *usage)
  633.  = {0x2F3C,0x4,0x81,0x7000,0xA82A}; 
  634.  
  635. pascal ComponentResult SGSetChannelBounds(SGChannel c,Rect *bounds)
  636.  = {0x2F3C,0x4,0x82,0x7000,0xA82A}; 
  637. pascal ComponentResult SGGetChannelBounds(SGChannel c,const Rect *bounds)
  638.  = {0x2F3C,0x4,0x83,0x7000,0xA82A}; 
  639.  
  640. pascal ComponentResult SGSetChannelVolume(SGChannel c,short volume)
  641.  = {0x2F3C,0x2,0x84,0x7000,0xA82A}; 
  642. pascal ComponentResult SGGetChannelVolume(SGChannel c,short *volume)
  643.  = {0x2F3C,0x4,0x85,0x7000,0xA82A}; 
  644.  
  645. pascal ComponentResult SGGetChannelInfo(SGChannel c,long *channelInfo)
  646.  = {0x2F3C,0x4,0x86,0x7000,0xA82A}; 
  647.  
  648. pascal ComponentResult SGSetChannelPlayFlags(SGChannel c, long playFlags)
  649.  = {0x2F3C,0x4,0x87,0x7000,0xA82A}; 
  650. pascal ComponentResult SGGetChannelPlayFlags(SGChannel c, long *playFlags)
  651.  = {0x2F3C,0x4,0x88,0x7000,0xA82A}; 
  652.  
  653. pascal ComponentResult SGSetChannelMaxFrames(SGChannel c, long frameCount)
  654.  = {0x2F3C,0x4,0x89,0x7000,0xA82A}; 
  655. pascal ComponentResult SGGetChannelMaxFrames(SGChannel c, long *frameCount)
  656.  = {0x2F3C,0x4,0x8A,0x7000,0xA82A}; 
  657.  
  658. pascal ComponentResult SGSetChannelRefCon(SGChannel c, long refCon)
  659.  = {0x2F3C,0x4,0x8B,0x7000,0xA82A}; 
  660.  
  661. #ifdef __cplusplus
  662. }
  663. #endif
  664. /* Video Routines */
  665.  
  666. struct SGCompressInfo {
  667.     Ptr                buffer;
  668.     unsigned long    bufferSize;
  669.     unsigned char    similarity;
  670.     unsigned char    reserved;
  671. };
  672. typedef struct SGCompressInfo SGCompressInfo;
  673.  
  674. typedef pascal ComponentResult (*GrabProc)(SGChannel c, short bufferNum, long refCon);
  675. typedef pascal ComponentResult (*GrabCompleteProc)(SGChannel c, short bufferNum, Boolean *done, long refCon);
  676. typedef pascal ComponentResult (*DisplayProc)(SGChannel c, short bufferNum, MatrixRecord *mp, RgnHandle clipRgn, long refCon);
  677. typedef pascal ComponentResult (*CompressProc)(SGChannel c, short bufferNum, long refCon);
  678. typedef pascal ComponentResult (*CompressCompleteProc)(SGChannel c, short bufferNum,
  679.                                         Boolean *done, SGCompressInfo *ci, long refCon);
  680. typedef pascal ComponentResult (*AddFrameProc)(SGChannel c, short bufferNum, TimeValue atTime, TimeScale scale,
  681.                             const SGCompressInfo *ci, long refCon);
  682. typedef pascal ComponentResult (*TransferFrameProc)(SGChannel c, short bufferNum, MatrixRecord *mp, RgnHandle clipRgn, long refCon);
  683.  
  684. struct VideoBottles {
  685.  short procCount;
  686.  GrabProc grabProc;
  687.  GrabCompleteProc grabCompleteProc;
  688.  DisplayProc displayProc;
  689.  CompressProc compressProc;
  690.  CompressCompleteProc compressCompleteProc;
  691.  AddFrameProc addFrameProc;
  692.  TransferFrameProc transferFrameProc;
  693. };
  694.  
  695. typedef struct VideoBottles VideoBottles;
  696.  
  697.  
  698. #ifdef __cplusplus
  699. extern "C" {
  700. #endif
  701. pascal ComponentResult SGGetSrcVideoBounds(SGChannel c,Rect *r)
  702.  = {0x2F3C,0x4,0x100,0x7000,0xA82A}; 
  703. pascal ComponentResult SGSetVideoRect(SGChannel c,Rect *r)
  704.  = {0x2F3C,0x4,0x101,0x7000,0xA82A}; 
  705. pascal ComponentResult SGGetVideoRect(SGChannel c,Rect *r)
  706.  = {0x2F3C,0x4,0x102,0x7000,0xA82A}; 
  707.  
  708. pascal ComponentResult SGGetVideoCompressorType(SGChannel c,OSType *compressorType)
  709.  = {0x2F3C,0x4,0x103,0x7000,0xA82A}; 
  710. pascal ComponentResult SGSetVideoCompressorType(SGChannel c,OSType compressorType)
  711.  = {0x2F3C,0x4,0x104,0x7000,0xA82A}; 
  712.  
  713. pascal ComponentResult SGSetVideoCompressor(SGChannel c,short depth,CompressorComponent compressor,
  714.  CodecQ spatialQuality,CodecQ temporalQuality,long keyFrameRate)
  715.  = {0x2F3C,0x12,0x105,0x7000,0xA82A}; 
  716. pascal ComponentResult SGGetVideoCompressor(SGChannel c,short *depth,CompressorComponent *compressor,
  717.  CodecQ *spatialQuality,CodecQ *temporalQuality,long *keyFrameRate)
  718.  = {0x2F3C,0x14,0x106,0x7000,0xA82A}; 
  719.  
  720. pascal ComponentInstance SGGetVideoDigitizerComponent(SGChannel c) 
  721.  = {0x2f3c,0,263,0x7000,0xa82a};
  722. pascal ComponentResult SGSetVideoDigitizerComponent(SGChannel c, ComponentInstance vdig)
  723.  = {0x2f3c,4,264,0x7000,0xa82a};
  724. pascal ComponentResult SGVideoDigitizerChanged(SGChannel c)
  725.  = {0x2f3c,0,265,0x7000,0xa82a};
  726.  
  727. pascal ComponentResult SGSetVideoBottlenecks(SGChannel c, VideoBottles *vb)
  728.  = {0x2f3c,4,266,0x7000,0xa82a};
  729. pascal ComponentResult SGGetVideoBottlenecks(SGChannel c, VideoBottles *vb)
  730.  = {0x2f3c,4,267,0x7000,0xa82a};
  731.  
  732. pascal ComponentResult SGGrabFrame(SGChannel c, short bufferNum)
  733.  = {0x2f3c,2,268,0x7000,0xa82a};
  734. pascal ComponentResult SGGrabFrameComplete(SGChannel c, short bufferNum, Boolean *done)
  735.  = {0x2f3c,6,269,0x7000,0xa82a};
  736.  
  737. pascal ComponentResult SGDisplayFrame(SGChannel c, short bufferNum, MatrixRecord *mp, 
  738.  RgnHandle clipRgn)
  739.  = {0x2f3c,10,270,0x7000,0xa82a};
  740.  
  741. pascal ComponentResult SGCompressFrame(SGChannel c, short bufferNum)
  742.  = {0x2f3c,2,271,0x7000,0xa82a};
  743. pascal ComponentResult SGCompressFrameComplete(SGChannel c, short bufferNum, 
  744.  Boolean *done, SGCompressInfo *ci)
  745.  = {0x2f3c,10,272,0x7000,0xa82a};
  746.  
  747. pascal ComponentResult SGAddFrame(SGChannel c, short bufferNum, TimeValue atTime, 
  748.  TimeScale scale, const SGCompressInfo *ci)
  749.  = {0x2f3c,14,273,0x7000,0xa82a};
  750.  
  751. pascal ComponentResult SGTransferFrameForCompress(SGChannel c, short bufferNum, 
  752.  MatrixRecord *mp, RgnHandle clipRgn)
  753.  = {0x2f3c,10,274,0x7000,0xa82a};
  754.  
  755. pascal ComponentResult SGSetCompressBuffer(SGChannel c, short depth, const Rect *compressSize)
  756.  = {0x2f3c,6,279,0x7000,0xa82a};
  757.  
  758. pascal ComponentResult SGGetCompressBuffer(SGChannel c, short *depth, Rect *compressSize)
  759.  = {0x2f3c,8,280,0x7000,0xa82a};
  760.  
  761. pascal ComponentResult SGGetBufferInfo(SGChannel c, short bufferNum, 
  762.  PixMapHandle *bufferPM, Rect *bufferRect,GWorldPtr *compressBuffer,
  763.  Rect *compressBufferRect) 
  764.  = {0x2f3c,18,281,0x7000,0xa82a};
  765.  
  766. /*   Sound Routines   */
  767. pascal ComponentResult SGSetSoundInputDriver(SGChannel c,const Str255 driverName)
  768.  = {0x2F3C,0x4,0x100,0x7000,0xA82A}; 
  769. pascal long SGGetSoundInputDriver(SGChannel c)
  770.  = {0x2F3C,0x0,0x101,0x7000,0xA82A}; 
  771. pascal ComponentResult SGSoundInputDriverChanged(SGChannel c)
  772.  = {0x2F3C,0x0,0x102,0x7000,0xA82A}; 
  773.  
  774. pascal ComponentResult SGSetSoundRecordChunkSize(SGChannel c,long seconds)
  775.  = {0x2F3C,0x4,0x103,0x7000,0xA82A}; 
  776. pascal long SGGetSoundRecordChunkSize(SGChannel c)
  777.  = {0x2F3C,0x0,0x104,0x7000,0xA82A}; 
  778.  
  779. pascal ComponentResult SGSetSoundInputRate(SGChannel c,Fixed rate)
  780.  = {0x2F3C,0x4,0x105,0x7000,0xA82A}; 
  781. pascal Fixed SGGetSoundInputRate(SGChannel c)
  782.  = {0x2F3C,0x0,0x106,0x7000,0xA82A}; 
  783.  
  784. /*   calls from seqGrab to Channel   */
  785. pascal ComponentResult SGInitChannel(SGChannel c,SeqGrabComponent owner)
  786.  = {0x2F3C,0x4,0xC8,0x7000,0xA82A}; 
  787. pascal ComponentResult SGWriteSamples(SGChannel c,Movie m,AliasHandle theFile)
  788.  = {0x2F3C,0x8,0xC9,0x7000,0xA82A}; 
  789. pascal ComponentResult SGGetDataRate(SGChannel c,long *bytesPerSecond)
  790.  = {0x2F3C,0x4,0xCA,0x7000,0xA82A}; 
  791.  
  792. /*   calls from Channel to seqGrab   */
  793. pascal ComponentResult SGWriteMovieData(SeqGrabComponent s,SGChannel c,
  794.  Ptr p,long len,long *offset)
  795.  = {0x2F3C,0x10,0x80,0x7000,0xA82A}; 
  796. pascal ComponentResult SGAddFrameReference(SeqGrabComponent s,SeqGrabFrameInfo *frameInfo)
  797.  = {0x2F3C,0x4,0x81,0x7000,0xA82A}; 
  798. pascal ComponentResult SGGetNextFrameReference(SeqGrabComponent s,SeqGrabFrameInfo *frameInfo,
  799.  TimeValue *frameDuration,long *frameNumber)
  800.  = {0x2F3C,0xC,0x82,0x7000,0xA82A}; 
  801. pascal ComponentResult SGGetTimeBase(SeqGrabComponent s,TimeBase *tb)
  802.  = {0x2F3C,0x4,0x83,0x7000,0xA82A}; 
  803. #ifdef __cplusplus
  804. }
  805. #endif
  806.  
  807. /* Preview Component*/
  808. struct ResourceDesc {
  809.     ResType            resourceType;
  810.     short            resourceId;
  811. };
  812. typedef struct ResourceDesc    ResourceDesc;
  813.  
  814. struct ThumbnailList {
  815.     unsigned long    date;                /* When the resource was last modified. */
  816.     short            version;            /* Always 3 when using version shown here. */
  817.     ResType            prevComponentType;    /* The type of Preview Component that made the preview */
  818.     Str31            fileTypeDesc;        /* Vernacular description of the type of the file */
  819.     short            fileTypeDescScript;    /* Script code for the file desc string */
  820.     short            count;                /* number of elements in the following array */
  821.     ResourceDesc    resources[1];        /* an array of resource descriptions */
  822. };
  823. typedef struct ThumbnailList    ThumbnailList;
  824. typedef ThumbnailList *ThumbnailListPtr, **ThumbnailListHandle;
  825.  
  826. struct Str31WithScript
  827. {
  828.     Str31        theString;
  829.     short        scriptCode;
  830. };
  831. typedef struct Str31WithScript Str31WithScript;
  832. typedef Str31WithScript *Str31WithScriptPtr, **Str31WithScriptHandle;
  833.  
  834. struct PreviewStatusRec {
  835.     StandardFileReply    fileInfo;        /* See StandardFile.h */
  836.     long                fileSize;        /* File size in bytes */
  837.     short                resRefNum;        /* resource RefNum or 0 if no resource fork */
  838.     ThumbnailListHandle    PRVLHandle;        /* handle to the PRVL or 0 if none */ 
  839.     };
  840. typedef struct PreviewStatusRec PreviewStatusRec;
  841. typedef PreviewStatusRec *PreviewStatusPtr, **PreviewStatusHandle;
  842.  
  843. #define PreviewComponentType        'prvt'
  844.  
  845. /* The subtypes of the preview components provided by Apple */
  846. #define FileInfoPrevCompSubType        'finf'        /* Shows file type (from PRVL) and size */
  847. #define PICTPrevCompSubType            'PICT'        /* Creates / Shows PICT thumbnails */
  848. #define MoviePrevCompSubType        'MooV'        /* Creates thumbnails for movie files */
  849.  
  850. typedef ComponentInstance Previewer;
  851.  
  852.  
  853. #define    prevComponentCreatePreviewRefNum    2
  854. #define    prevComponentGetPreviewData            3
  855. #define    prevComponentAddPreviewRefNum        5
  856. #define    prevComponentStartPreviewing        11
  857. #define    prevComponentDoDraw                    12
  858. #define    prevComponentTimeSlice                13
  859. #define    prevComponentDoMouseDown            14
  860. #define    prevComponentLastCall                15
  861.  
  862. enum {
  863. prevComponentCantPreviewThisFile                 = -9999,
  864. prevComponentCouldGeneratePreviewForThisFile    = -9998
  865. };
  866. enum {
  867. prevComponentDontNeedTimeSlice                    = -9993
  868. };
  869.  
  870. #ifdef __cplusplus
  871. extern "C" {
  872. #endif
  873. pascal ComponentResult PreviewerCreatePreviewForResRefNum(Previewer p,short resRefNum,
  874.  FSSpecPtr theFile,Boolean removeOldPreviews,Str31WithScriptPtr fileTypeDescription,
  875.  ProgressProcRecordPtr progressProc)
  876.  = {0x2F3C,0x10,prevComponentCreatePreviewRefNum,0x7000,0xA82A};
  877. pascal ComponentResult PreviewerGetPreviewData(Previewer p,FSSpecPtr theFile,
  878.  Handle previewData,Handle auxData,ProgressProcRecordPtr progressProc)
  879.  = {0x2F3C,0x10,prevComponentGetPreviewData,0x7000,0xA82A};
  880. pascal ComponentResult PreviewerAddPreviewDataRefNum(Previewer p,short resRefNum,
  881.  FSSpecPtr theFile,Boolean removeOldPreviews,Str31WithScriptPtr fileTypeDescription,
  882.  Handle previewData,Handle auxData)
  883.  = {0x2F3C,0x14,prevComponentAddPreviewRefNum,0x7000,0xA82A};
  884. pascal ComponentResult PreviewerStartPreviewing(Previewer p,PreviewStatusPtr status,
  885.  WindowPtr window,Rect * boundsRect,Boolean * NeedInitialUpdate)
  886.  = {0x2F3C,0x10,prevComponentStartPreviewing,0x7000,0xA82A};
  887. pascal ComponentResult PreviewerDoDraw(Previewer p, PreviewStatusPtr status)
  888.  = {0x2F3C,0x4,prevComponentDoDraw,0x7000,0xA82A};
  889. pascal ComponentResult PreviewerTimeSlice(Previewer p, PreviewStatusPtr status)
  890.  = {0x2F3C,0x4,prevComponentTimeSlice,0x7000,0xA82A};
  891. pascal ComponentResult PreviewerLastCall(Previewer p, PreviewStatusPtr status)
  892.  = {0x2F3C,0x4,prevComponentLastCall,0x7000,0xA82A};
  893. #ifdef __cplusplus
  894. }
  895. #endif
  896.  
  897.  
  898. #endif
  899.